<?php
  header("Content-type:application/json");
  include("../conn/conn.php");
  
   $json=file_get_contents("php://input");
   $arr=json_decode($json,true);
   $pwd=$arr['pwd'];
   $code=$arr['code'];
   $sql="SELECT * from grad_user where `code`='$code' and `pwd`= '$pwd'";
   
   $result=mysqli_query($link,$sql);
   if(mysqli_num_rows($result)>0){
    
      $res=array(
        'code'=>200,
        'msg'=>'登录成功'
      ); 
   }else{
      $res=array(
        'code'=>201,
        'msg'=>'登录失败'
      );
   }
   echo json_encode($res,true);
